//
//  LHSingerListTableViewCell.m
//  Enjoy_Music
//
//  Created by Bruce_Lin on 15/6/11.
//  Copyright (c) 2015年 Bruce. All rights reserved.
//

#import "LHSingerListTableViewCell.h"

@implementation LHSingerListTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        self.headPic = [[UIImageView alloc]init];
        [self.contentView addSubview:_headPic];
        
        self.nameLabel = [[UILabel alloc]init];
        [self.contentView addSubview:_nameLabel];
        _nameLabel.textColor = [UIColor whiteColor];
        
        self.separateLabel = [[UILabel alloc]init];
        [self.contentView addSubview:_separateLabel];
        _separateLabel.backgroundColor = [UIColor colorWithRed:0.821 green:0.809 blue:0.833 alpha:1.000];
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    
    [self.headPic setFrame:CGRectMake(10, 10, LHWidth / 4 - 15, self.contentView.frame.size.height - 20)];
    _headPic.layer.masksToBounds = YES;
    _headPic.layer.cornerRadius = (self.contentView.frame.size.height - 20) / 2.0;
    [self.nameLabel setFrame:CGRectMake(_headPic.frame.size.width + 15, self.contentView.frame.size.height / 2 - 15, LHWidth - _headPic.frame.size.width - 5, 30)];
    [self.separateLabel setFrame:CGRectMake(_headPic.frame.size.width + 15, self.contentView.frame.size.height - 0.3, _nameLabel.frame.size.width, 0.3)];
}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
